//
//  VideoCellModel.m
//  Alltelevisionnews
//
//  Created by dllo on 15/11/30.
//  Copyright © 2015年 三人行. All rights reserved.
//

#import "SLVideoCellModel.h"

@implementation SLVideoCellModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"description"]) {
        self.myDescription = value;
    }
}


- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.replayCount forKey:@"replayCount"];
    [aCoder encodeObject:self.videosource forKey:@"videosource"];
    [aCoder encodeObject:self.mp4Hd_url forKey:@"mp4Hd_url"];
    [aCoder encodeObject:self.cover forKey:@"cover"];
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.playCount forKey:@"playCount"];
    [aCoder encodeObject:self.replyBoard forKey:@"replayBoard"];
    [aCoder encodeObject:self.replyid forKey:@"replayid"];
    [aCoder encodeObject:self.myDescription forKey:@"myDescription"];
    [aCoder encodeObject:self.mp4_url forKey:@"mp4_url"];
    [aCoder encodeObject:self.length forKey:@"length"];
    [aCoder encodeObject:self.playersize forKey:@"playersize"];
    [aCoder encodeObject:self.m3u8Hd_url forKey:@"m3u8HD_url"];
    [aCoder encodeObject:self.vid forKey:@"vid"];
    [aCoder encodeObject:self.m3u8_url forKey:@"m3u8_url"];
    [aCoder encodeObject:self.ptime forKey:@"ptime"];
}


- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.playCount = [aDecoder decodeObjectForKey:@"replayCount"];
        self.videosource = [aDecoder decodeObjectForKey:@"videosource"];
        self.mp4Hd_url = [aDecoder decodeObjectForKey:@"mp4Hd_url"];
        self.cover = [aDecoder decodeObjectForKey:@"cover"];
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.playCount = [aDecoder decodeObjectForKey:@"playCount"];
        self.replyBoard = [aDecoder decodeObjectForKey:@"replyBoard"];
        self.replyid = [aDecoder decodeObjectForKey:@"replayid"];
        self.myDescription = [aDecoder decodeObjectForKey:@"myDescription"];
        self.mp4_url = [aDecoder decodeObjectForKey:@"mp4_url"];
        self.length = [aDecoder decodeObjectForKey:@"length"];
        self.playersize = [aDecoder decodeObjectForKey:@"playersize"];
        self.m3u8Hd_url = [aDecoder decodeObjectForKey:@"m3u8Hd_url"];
        self.vid = [aDecoder decodeObjectForKey:@"vid"];
        self.m3u8_url = [aDecoder decodeObjectForKey:@"m3u8_url"];
        self.ptime = [aDecoder decodeObjectForKey:@"ptime"];
    }
    
    return self;
}

@end
